package com.tocean.app.dto.request;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@ApiModel(value = "SortRequest", description = "排序规则")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class BaseSortRequest {

    @ApiModelProperty(value = "排序字段", notes = "排序字段", required = true, hidden = false)
    private String sortName;

    @ApiModelProperty(value = "排序规则：ASC，DESC", notes = "排序规则：ASC，DESC", required = true, hidden = false)
    private Sort sort;

    public enum Sort {
        ASC, DESC;
    }

}
